<form class="form-horizontal" name="form1" ng-submit="onSubmit(form1)">
  <div class="modal-header">
    <button type="button" class="close" ng-click="cancel()">
      <span aria-hidden="true">&times;</span>
    </button>
    <h4 class="modal-title text-info">
      <i class="fa fa-edit"></i>
      <!-- 恢复 -->
      {{'restore.title'|translate}}
    </h4>
  </div>
  <div class="modal-body">

    <div class="form-group">
      <label class="col-sm-2 control-label">
        <!-- 文件: -->
        {{'file'|translate}}:
      </label>
      <div class="col-sm-10 input-md pdt4">oss://{{currentInfo.bucket}}/{{currentInfo.key}}{{item.name}}</div>
    </div>

    <div is-loading ng-if="isLoading"></div>

    <div ng-if="!isLoading && info.type==2" class="alert alert-warning">
      <!-- 正在恢复中，请耐心等待！ -->
      {{'restore.onprogress'|translate}}
    </div>
     <div ng-if="!isLoading && info.type==3" class="alert alert-success">
       <!-- 可读截止时间： -->
       {{'restore.message2'|translate}}:
       {{info['expiry_date']}}</div>

    <div ng-if="!isLoading && info.type==1" class="form-group"
    ng-class="{'has-error': form1.name.$dirty && !form1.name.$valid,
  'has-success': form1.name.$dirty && form1.name.$valid}">

      <label class="col-sm-2 control-label" for="days">
        <!-- 恢复天数: -->
        {{'restore.days'|translate}}:
      </label>
      <div class="col-sm-8">
        <input type="number" readonly max="7" step="1" min="1" ng-model="info.days" id="days" autocomplete="off" autofocus
         name="days" required="required" class="input-md form-control"/>
      </div>

      <div class="clearfix"></div>
    </div>

  </div>
  <div class="modal-footer">
    <button ng-disabled="isLoading || info.msg" type="submit" class="btn btn-success btn-sm">
      <i class="glyphicon glyphicon-ok"></i>
      <!-- 确定 -->
      {{'ok'|translate}}
    </button>
    <button type="button" class="btn btn-default btn-sm" ng-click="cancel()">
      <i class="glyphicon glyphicon-remove"></i>
      <!-- 取消 -->
      {{'cancel'|translate}}
    </button>
  </div>
</form>
